package hu.arguscab.ai;

/**
 * A class represents a parent-child relationship between two <code>Nodes</code>
 * @param <E> The data type that <code>Edge</code> contain. 
 * @param <N> The data type that <code>Node</code> contain. 
 * @author sharp
 */
public class NodePair<E, N> {
	private Node<N> from, to;
	private Edge<E> edge;

	public NodePair(Node<N> from, Node<N> to, Edge<E> edge) {
		this.from = from;
		this.to = to;
		this.edge = edge;
	}

	public Edge<E> getEdge() {
		return edge;
	}

	public void setEdge(Edge<E> edge) {
		this.edge = edge;
	}

	public Node<N> getFrom() {
		return from;
	}

	public void setFrom(Node<N> from) {
		this.from = from;
	}

	public Node<N> getTo() {
		return to;
	}

	public void setTo(Node<N> to) {
		this.to = to;
	}

	@Override
	public String toString() {
		return from + "=={"+edge+"}==>" + to;
	}

}
